﻿using AutoMapper;
using Rechargeable.Machines;
using Rechargeable.Machines.Dto;
using Rechargeable.Products;
using Rechargeable.Products.Dtos;

namespace Rechargeable
{
    public class RechargeableApplicationAutoMapperProfile : Profile
    {
        public RechargeableApplicationAutoMapperProfile()
        {
            /* You can configure your AutoMapper mapping configuration here.
             * Alternatively, you can split your mapping configurations
             * into multiple profile classes for a better organization. */

            CreateMap<Product, ProductDto>();
            CreateMap<CreateUpdateProductDto, Product>();

            CreateMap<ProductPrice, ProductPriceDto>();
            CreateMap<CreateUpdateProductPriceDto, ProductPrice>();

            CreateMap<Machine, MachineDto>();
            CreateMap<CreateUpdateMachineDto, Machine>().ReverseMap();
            CreateMap<SerialNumber, SerialNumberDto>();

            CreateMap<Games.GameAccount, Games.Dto.GameAccountDto>();
            CreateMap<Games.Dto.CreateUpdateGameAccountDto, Games.GameAccount>().ReverseMap();

            CreateMap<Games.Dto.CardInfomationDto, Games.CardInformation>().ReverseMap();
        }
    }
}
